package inherit.homework1;

public abstract class Instructor {
    private String name;
    private String sex;
    private  int age;
    private int yearsOfTeach;
    private String address;
    public Instructor() {

    }
    public Instructor(String name, String sex, int age, int yearsOfTeach, String address) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.yearsOfTeach = yearsOfTeach;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getYearsOfTeach() {
        return yearsOfTeach;
    }

    public void setYearsOfTeach(int yearsOfTeach) {
        this.yearsOfTeach = yearsOfTeach;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public abstract void giveLession();
    public void showMySelf(){
        System.out.println("大家好！我叫"+this.name+",性别："+this.sex+",今年"+this.age+"岁,教龄"
                +this.yearsOfTeach+"年,在"+this.address+"教课！");
    }

}